]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
search: Rename pushResults to setResults
authorJasper St. Pierre <jstpierre@mecheye.net>
Sat, 9 Feb 2013 03:03:28 +0000 (22:03 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Wed, 29 May 2013 15:32:49 +0000 (11:32 -0400)
pushResults, and the original async search API, were originally intended
so search results that weren't immediate could be added as they come in.
Since then, we've decided that the design of search results is that they
should finish at once with all results. Thus, the code was modified so
that pushResults always overwrote the current result set. As such, it makes
sense to rename the method so that the name matches the behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=693836

js/ui/appDisplay.js
js/ui/remoteSearch.js
js/ui/search.js
js/ui/wanda.js

index 7f92d12fdcd97bdb5994731d303460217e088745..8cba94e5940c690686dce18cff39669e6752738e 100644 (file)
@@ -509,11 +509,11 @@ const AppSearchProvider = new Lang.Class({
     },
 
     getInitialResultSet: function(terms) {
-        this.searchSystem.pushResults(this, this._appSys.initial_search(terms));
+        this.searchSystem.setResults(this, this._appSys.initial_search(terms));
     },
 
     getSubsearchResultSet: function(previousResults, terms) {
-        this.searchSystem.pushResults(this, this._appSys.subsearch(previousResults, terms));
+        this.searchSystem.setResults(this, this._appSys.subsearch(previousResults, terms));
     },
 
     activateResult: function(app) {
index 3d0c759b85724ecae632f5192dfbede1388a69cc..3aa74e488ebddfd8b6411d43acf6dd21e3f27274 100644 (file)
@@ -205,7 +205,7 @@ const RemoteSearchProvider = new Lang.Class({
     _getResultsFinished: function(results, error) {
         if (error)
             return;
-        this.searchSystem.pushResults(this, results[0]);
+        this.searchSystem.setResults(this, results[0]);
     },
 
     getInitialResultSet: function(terms) {
@@ -217,7 +217,7 @@ const RemoteSearchProvider = new Lang.Class({
                                                  this._cancellable);
         } catch(e) {
             log('Error calling GetInitialResultSet for provider %s: %s'.format(this.id, e.toString()));
-            this.searchSystem.pushResults(this, []);
+            this.searchSystem.setResults(this, []);
         }
     },
 
@@ -230,7 +230,7 @@ const RemoteSearchProvider = new Lang.Class({
                                                    this._cancellable);
         } catch(e) {
             log('Error calling GetSubsearchResultSet for provider %s: %s'.format(this.id, e.toString()));
-            this.searchSystem.pushResults(this, []);
+            this.searchSystem.setResults(this, []);
         }
     },
 
index 3dd59d720bb1e036a5477655b7c723af2397517a..03348b2d83e43a5727753d648c68431b6aca949b 100644 (file)
@@ -51,7 +51,7 @@ const SearchSystem = new Lang.Class({
         this._previousResults = [];
     },
 
-    pushResults: function(provider, results) {
+    setResults: function(provider, results) {
         let i = this._providers.indexOf(provider);
         if (i == -1)
             return;
index 3d5d568988af7a44f503cbc0ba76951e423c06be..713f4cdca8622ae7ed69ea691a214a0c03b87044 100644 (file)
@@ -134,9 +134,9 @@ const WandaSearchProvider = new Lang.Class({
 
     getInitialResultSet: function(terms) {
         if (terms.join(' ') == MAGIC_FISH_KEY) {
-            this.searchSystem.pushResults(this, [ FISH_NAME ]);
+            this.searchSystem.setResults(this, [ FISH_NAME ]);
         } else {
-            this.searchSystem.pushResults(this, []);
+            this.searchSystem.setResults(this, []);
         }
     },